# 启动moveit rviz 还有gazebo

from launch import LaunchDescription
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch_ros.actions import Node

def generate_launch_description():
    
    moveit_config_path = get_package_share_directory('moveit_config')
    robot_description_path = get_package_share_directory('robot_description')
    
    moveit_config = IncludeLaunchDescription(
            PythonLaunchDescriptionSource([moveit_config_path+'/launch/moveit_for_gazebo.launch.py'])
    )
    
    robot_description = IncludeLaunchDescription(
            PythonLaunchDescriptionSource([robot_description_path+'/launch/start_gazebo.launch.py'])
    )
    
    return LaunchDescription([
        robot_description,
        moveit_config
        
    ])